// let func = (r1, r2, rest) => {
//     return {name:r1, age: r2, ...rest};
// }

// let p = func('Charlie', 1, {addr:'addr',tel:'tel'})

// console.log(p);
// let f = ([a, b] = [1, 2], {x: c} = {x: a + b}) => a + b + c;
// console.log( f());  // 6


let res = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
    var r = (Math.random() * 16) | 0,
      v = c == "x" ? r : (r & 0x3) | 0x8;
    return v.toString(16);
  })
  console.log(res)